
import numpy as np


def generateboard(prob,N):

    board = {}
    players = []
    scores = []

    for i in range(1,N+1):
        for j in range(1,N+1):
            if ((i!=1) | (j !=1)) & ((i!=N) | (j != N)):
                # index = 1 pacakge     index = 2 block   index = 3 way to go
                index = np.random.choice(3, 1, replace=False, p=prob)[0] + 1
                if index == 1:
                    score = np.random.randint(20,50)
                else:
                    score = 0
                board[(i,j)] = (index,score)
            elif ((i== 1) & (j == 1)):
                index = 4
                board[(i,j)] = (index,1)
                players.append([i,j,index,1])
                scores.append((1,0,0))
            elif ((i==N) & (j == N)):
                index = 4
                board[(i,j)] = (index, 2)
                players.append([i, j, index, 2])
                scores.append((2,0,0))

    boardSet = [board, players, scores]
    print(boardSet[2])

    return boardSet

